﻿using Himp.Outpatient;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;

namespace Himp.Platform
{
    /// <summary>
    /// 门诊排班
    /// </summary>
    public class OtpSchdsQuery : ISingletonDependency
    {
        private readonly IServiceProvider _serviceProvider;

        public OtpSchdsQuery(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        /// <summary>
        /// 获取门诊排班类别
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PagedResultDto<OtpSchdTypeDto>> GetOtpSchdTypeListAsync(OtpSchdTypeInput input)
        {
            var otpSchdTypeService = _serviceProvider.GetService<IOtpSchdTypeService>();

            return await otpSchdTypeService.GetListAsync(input);
        }

        /// <summary>
        /// 获取门诊排班计划
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PagedResultDto<OtpSchdPlanDto>> GetOtpSchdPlanListAsync(OtpSchdPlanInput input)
        {
            var otpSchdPlanService = _serviceProvider.GetService<IOtpSchdPlanService>();

            return await otpSchdPlanService.GetListAsync(input);
        }

        /// <summary>
        /// 获取门诊排班记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PagedResultDto<OtpSchdRecDto>> GetOtpSchdRecListAsync(OtpSchdRecInput input)
        {
            var otpSchdRecService = _serviceProvider.GetService<IOtpSchdRecService>();

            return await otpSchdRecService.GetListAsync(input);
        }
    }
}
